﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.nuevoJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.validatelJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.unobtrusiveJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.calendarioJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.autocompleteJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.dependenciaJS)" ></script> 
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.fileJS)" ></script> 

@model sipfe.model.dataAccess.SIPMaeSolicitud
@using Resources;
@{
    Layout = "~/Views/Shared/Layaout/general/_LayoutGeneral.cshtml";
    var claseTramite = new List<SelectListItem> { 
        new SelectListItem { Text = "NIC", Value = "2108"}
    };         
}
<script type="text/javascript">
    $(function () {
        calendarioGeneral('dFecRecepFisica', '1');
       // setAutoAyudaInteresado("#nIdeEmpresa", "#nIdeCodPaisDoc", "#nIdeTipoDocum", "#vNumDocum", "#vNombres", "/AutoAyuda/ListaInteresadoAuto", "1");
        //setAutoAyudaInteresado("#nIdeEmpresa", "#nIdeCodPaisDoc", "#nIdeTipoDocum", "#vNombres", "#vNumDocum", "/AutoAyuda/ListaInteresadoAuto", "2");
       // inicioPopPupModal("#buscaInteresadoPop", 300, 780);
        setAutoAyudaMultiple("#vDestino", "/Auto/AutoAyuda/ListaAreaMultipleDerivar");
    });
</script>

<center>
     @using (Html.BeginForm("AddNuevoCaso", "Nuevo", FormMethod.Post, new { enctype = "multipart/form-data" }))
     {
        <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0" class="tituloWhite8">
            <tr>
                <td style="width:15%">&nbsp;</td>
                <td style="width:25%" align="left">Clase de Solicitud:
                    @Html.DropDownListFor(model => model.nIdeClaseSolicitud, (IEnumerable<SelectListItem>)claseTramite, new { @class = "select8" }) 
                </td>
                <td style="width:60%" align="right">@ViewBag.TITULO</td>
            </tr>
        </table>    
        <br/><br/>
         <table border="0" cellpadding="0" cellspacing="0">
             <tr>
                 <td> @Html.ValidationSummary(false, "Los Siguientes Campos son Obligatorios:")</td>
             </tr>
         </table>
        

         <fieldset style="width: 850px;" class="fieldsetStyle1">
         <legend class="tituloBlue9">DATOS GENERALES DEL CASO</legend>
             <table border="0" style="width: 100%;" cellpadding="3" cellspacing="0">
             <tbody class="tituloCelesteN8">
                <tr>
                    <td style="width:140px;">Dependencia de Proceso</td>
                    <td style="width:2px;">:</td>
                    <td>
                        <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0">
                        <tbody class="tituloCelesteB8">
                            <tr>
                                <td class="textNormal8" style="width:300px;">@Session["vDependencia"]&nbsp;-&nbsp;@Session["nIdeDep"]</td>                                
                                <td align="right">F. Recep. F&iacute;sica<span class="asterisco">(*)</span></td>
                                <td>:</td>
                                <td>
                                    @Html.TextBoxFor(model => model.dFecRecepFisica, new {style="width:60px;", maxlength=10, ondblclick="javascript:cleanBox(this);"})                                    
                                </td>
                                <td>Hora Recep. F.<span class="asterisco">(*)</span></td>
                                <td>:</td>
                                <td>
                                <table border="0" cellpadding="0" cellspacing="0">
                                <tbody class="tituloCelesteB8">
                                    <tr>
                                        <td>
                                            @Html.TextBoxFor(model => model.hora, new {style="width:15px;", maxlength=2, Value=@String.Format("{0:HH}", DateTime.Now) , ondblclick="javascript:cleanBox(this);", onkeypress="return validarSoloNumeros(event);" , onblur="javascript:validaHora24(this,'1');"})
                                        </td>
                                        <td>:</td>
                                        <td>
                                            @Html.TextBoxFor(model => model.minuto, new {style="width:15px;", maxlength=2, Value=@String.Format("{0:mm}", DateTime.Now) , ondblclick="javascript:cleanBox(this);", onkeypress="return validarSoloNumeros(event);" , onblur="javascript:validaHora24(this,'2');"})                                            
                                        </td>
                                        <td>(hh24:mm)</td>
                                    </tr>
                                </tbody>
                                </table>
                            </td>
                            </tr>
                        </tbody>
                        </table>
                    </td>                    
                </tr> 
                 <tr>
                    <td style="width:145px;">Solicitante o Interesado<span class="asterisco">(*)</span></td>
                    <td style="width:2px;">:</td>
                    <td class="textNormal8">
                        @Session["Nombre"]   @Html.HiddenFor(model => model.nIdeEmpresa, new { Value = @Session["nIdePersona"] }) 
                    </td>                    
                </tr>
                 <tr>
                    <td style="width:140px;">Id. Documento Entrante</td>
                    <td style="width:2px;">:</td>
                    <td>
                        <table border="0" cellpadding="0" cellspacing="0">
                            <tbody class="tituloCelesteB8">
                                <tr align="center">
                                    <td>
                                        @Html.DropDownListFor(model => model.nIdeTipoDocEntra, (IEnumerable<SelectListItem>)ViewBag.DocAcompa, "--Seleccione--",  new { @class = "select8" }) 
                                    </td>
                                    <td>
                                        @Html.TextBoxFor(model => model.vDescrDocEntra, new {style="width:300px;", maxlength=100, onblur="javascript:onBlurUpper(this);"  })
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                 </tr>
                
                 <tr>
                    <td style="width:140px;">Referencia(s)</td>
                    <td style="width:2px;">:</td>
                    <td>
                        <table border="0" cellpadding="0" cellspacing="0" id="tblQuerida">
                            <tbody class="tituloCelesteB8">
                                <tr align="center">
                                    <td>                                        
                                        @Html.DropDownListFor(model => model.nIdeTipoDocumRef, (IEnumerable<SelectListItem>)ViewBag.DocAcompa, "--Seleccione--", new { @class = "select8" }) 
                                    </td>
                                    <td>                                        
                                        @Html.TextBoxFor(model => model.vNumDocumRef, new {style="width:300px;", maxlength=100, onblur="javascript:onBlurUpper(this);"})
                                    </td>
                                    <td id="tdRefe">
                                        <img src="@Url.Content("~/images/borrar.gif")" class="lupita2" alt="ELIMINAR" id="imgBorrar" style="display:none" onclick="javascript:deletereferencia(this,4,2);"   />
                                        <img src="@Url.Content("~/images/mas.gif")" class="lupita2" alt="AGREGAR"  id="imgAgregar" onclick="javascript:clonarReferencias(this,'tdRefe',4);"/>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                 </tr>
                 
                 <tr>
                    <td style="width:140px;">Tipo de Trámite<span class="asterisco">(*)</span></td>
                    <td style="width:2px;">:</td>
                    <td>
                        @Html.DropDownListFor(model => model.nTipoSolicitud, (IEnumerable<SelectListItem>)ViewBag.TipoTramite,  new { @class = "select8" })
                    </td>
                 </tr>
                 <tr>
                    <td style="width:140px;">Asunto<span class="asterisco">(*)</span></td>
                    <td style="width:2px;">:</td>
                    <td>
                        @Html.TextAreaFor(model => model.vAsunto, new { style = "width:670px;", maxlength = 500, ondblclick="javascript:cleanBox(this);", onkeypress="return validaAlfaNumTamanio(this, event, 500);", onblur="javascript:onBlurUpper(this);" })                        
                    </td>
                 </tr>
             </tbody>
             </table>
         </fieldset>
         <br/><br/>
         <fieldset style="width: 850px;" class="fieldsetStyle1">
             <legend class="tituloBlue9">DATOS ADICIONALES DEL CASO</legend>
             <table border="0" style="width: 100%;" cellpadding="3" cellspacing="0">
                 <tbody class="tituloCelesteN8">
                     <tr>
                         <td style="width: 140px;">De</td>
                         <td style="width: 2px;">:</td>
                         <td>
                                <table border="0" style="width:100%;" cellpadding="0" cellspacing="0">
                                    <tbody class="tituloCelesteB8">
                                    <tr>
                                        <td class="textNormal8">@Session["vCodUsuario"]&nbsp;[ <span id="divBandejaDerivar">@Session["vDependencia"]&nbsp;-&nbsp;@Session["nIdeDep"] </span>]</td>
                                        <td align="right">Para</td>
                                        <td>:</td>
                                        <td>@Html.DropDownListFor(model => model.nIdePara, (IEnumerable<SelectListItem>)ViewBag.Para,  new { @class = "select8" })</td>
                                        <td style="width:10px;">&nbsp;</td>
                                        <td align="right">Prioridad</td>
                                        <td>:</td>
                                        <td>
                                            @Html.DropDownListFor(model => model.nIdePrioridad, (IEnumerable<SelectListItem>)ViewBag.Prioridad,  new { @class = "select8" })
                                        </td>
                                        <td style="width:10px;">&nbsp;</td>
                                        <td align="right"># de Folios</td>
                                        <td>:</td>
                                        <td>
                                            @Html.TextBoxFor(model => model.nFolios, new { style = "width:20px;", maxlength = 3, onkeypress = "return validarSoloNumeros(event);" })
                                        </td>
                                    </tr>
                                </tbody>
                                </table>
                            </td>
                     </tr>
                     <tr>
                        <td>Destinatario</td>
                        <td>:</td>
                        <td class="textNormal8">@sipfe.util.Constante.BUZON_GENERAL_INVITADOS.BUZON</td>
                    </tr>
                     <tr>
                        <td>Adjunto</td>
                        <td>:</td>
                        <td>
                             <input type="file" style="width:660px;"  class="textBoxMin tituloCelesteB8" name="idAdjunto" id="idAdjunto"  onchange="javscript:validaAdjuntoDerivar(this);" />
                        </td>
                    </tr>
                 </tbody>
             </table>
         </fieldset>         
         <table border="0" style="width: 850px;" cellpadding="10" cellspacing="0">
                 <tr>
                     <td align="center">
                         <input type="button" value="Registrar Caso" onclick="javascript: registrarCaso(this, this.form);" /></td>
                 </tr>
         </table>
         <div id="buscaInteresadoPop" title="LISTADO DE SOLICITANTE(S) O INTERESADO(S)"></div>        
        @Html.HiddenFor(model => model.nIdeDepSolicitud, new { Value = @Session["nIdeDep"] })       
        @Html.HiddenFor(model => model.nIdeEstadoSol, new { @Value = 1 })         
        @Html.HiddenFor(model => model.nIdeUsuReg, new { Value = @Session["nIdeUsuario"] })
        @Html.HiddenFor(model => model.nIdeFuncionario, new { Value = @Session["nIdeFuncionario"] })
        @Html.HiddenFor(model => model.nIdeOrigenSol, new { @Value = 1 })        
        @Html.HiddenFor(model => model.nIdePlazo, new { @Value = 1 })
        @Html.HiddenFor(model => model.vDestino, new { @Value = sipfe.util.Constante.BUZON_GENERAL_INVITADOS.BUZON })
        @Html.HiddenFor(model => model.nIdeTipoDocum, new { @Value = 3 })
          

     }
</center>